<?php
global $themename, $shortname, $ipt_options;
$themename = "iPost";
$shortname = "ipt";

$cats_array = get_categories('hide_empty=0');
$pages_array = get_pages('hide_empty=0');
$site_pages = array();
$site_cats = array();
$pages_ids = array();
$cats_ids = array();

foreach ($pages_array as $pagg) {
	$site_pages[$pagg->ID] = htmlspecialchars($pagg->post_title);
	$pages_ids[] = $pagg->ID;
}

foreach ($cats_array as $categs) {
	$site_cats[$categs->cat_ID] = $categs->cat_name;
	$cats_ids[] = $categs->cat_ID;
}


$general = array(
    'name' => 'General',
    'icon' => 'general-icon',
    'options'=> array(
        array(
            'name' => 'Custom favicon',
            'id' => 'custom_favicon',
            'type' => 'upload',
            'std' => '',
            'desc' => "A favicon is a 16x16 pixel icon that represents your site; paste the URL to a icon image that you want to use as the image. NOTE: it's not allowed the .ico extension"
        ),
        array(
            'name' => 'Date Format',
            'id' => 'date_format',
            'type' => 'text',
            'std' => 'F j, Y',
            'desc' => 'Set the general date format of theme. Read <a target="_blank" href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date formatting</a>'
        ),
         array(
            'name' => 'Map text',
            'id' => 'map_text',
            'type' => 'text',
            'std' => '',
            'desc' => 'Set the text to show in the label of the map in the contact page'
        )
    )
);
$ipt_options['general'] = $general;


$home = array(
    'name' => 'Home Settings',
    'icon' => 'home-icon',
    'options'=> array(
        array(
            'name' => 'Post items count per page',
            'id' => 'post_count_page2',
            'type' => 'text',
            'std' => 10,
            'desc' => 'Show the number of posts per page'
        ),
        array(
            'name' => 'Post items count per page1',
            'id' => 'post_count_page3',
            'type' => 'text',
            'std' => 10,
            'desc' => __('Show the number of posts per page', $shortname)
        )
    )
);

$ipt_options['home-settings'] = $home;

$header = array(
    'name' => 'Header',
    'icon' => 'header-icon',
    'options' => array(
         array( 'name' => __('Custom Logo', 'ipt'),
               'desc' => __('Want to use a custom image as logo?', $shortname),
               'id' => 'use_logo',     
               'type' => 'on-off',
               'std' => 0),            
        array( 'name' => __('Logo URL', 'yiw'),
               'desc' => __('Enter the URL to your logo image', $shortname),
               'id' => 'logo5',     
               'type' => 'upload',  
               'deps' => array(
                    'id' => 'use_logo',
                    'value' => 1
               ),
               'std' => ''),
    )
);

$ipt_options['header'] = $header;

$footer = array(
    'name' => 'Footer',
    'icon' => 'footer-icon',
    'options' => array(
         array( 'name' => __('Custom Logo', 'ipt'),
               'desc' => __('Want to use a custom image as logo?', $shortname),
               'id' => 'use_logo1',     
               'type' => 'on-off',
               'std' => 0),            
        array( 'name' => __('Logo URL', 'yiw'),
               'desc' => __('Enter the URL to your logo image', $shortname),
               'id' => 'logo4',     
               'type' => 'upload',  
               'deps' => array(
                    'id' => 'use_logo1',
                    'value' => 1
               ),
               'std' => ''),
    )
);

$ipt_options['footer'] = $footer;

$blog = array(
    'name' => 'Blog',
    'icon' => 'blog-icon',
    'options' => array(
         array( 'name' => __('Custom Logo', 'ipt'),
               'desc' => __('Want to use a custom image as logo?', $shortname),
               'id' => 'use_logo2',     
               'type' => 'on-off',
               'std' => 0),            
        array( 'name' => __('Logo URL', 'yiw'),
               'desc' => __('Enter the URL to your logo image', $shortname),
               'id' => 'logo3',     
               'type' => 'upload',  
               'deps' => array(
                    'id' => 'use_logo2',
                    'value' => 1
               ),
               'std' => ''),
    )
);

$ipt_options['blog'] = $blog;

$gallery = array(
    'name' => 'Gallery',
    'icon' => 'gallery-icon',
    'options' => array(
         array( 'name' => __('Custom Logo', 'ipt'),
               'desc' => __('Want to use a custom image as logo?', $shortname),
               'id' => 'use_logo3',     
               'type' => 'on-off',
               'std' => 0),            
        array( 'name' => __('Logo URL', 'yiw'),
               'desc' => __('Enter the URL to your logo image', $shortname),
               'id' => 'logo2',     
               'type' => 'upload',  
               'deps' => array(
                    'id' => 'use_logo3',
                    'value' => 1
               ),
               'std' => ''),
    )
);

$ipt_options['gallery'] = $gallery;

$portfolio = array(
    'name' => 'Portfolio',
    'icon' => 'portfolio-icon',
    'options' => array(
         array( 'name' => __('Custom Logo', 'ipt'),
               'desc' => __('Want to use a custom image as logo?', $shortname),
               'id' => 'use_logo4',     
               'type' => 'on-off',
               'std' => 0),            
        array( 'name' => __('Logo URL', 'yiw'),
               'desc' => __('Enter the URL to your logo image', $shortname),
               'id' => 'logo1',     
               'type' => 'upload',  
               'deps' => array(
                    'id' => 'use_logo4',
                    'value' => 1
               ),
               'std' => ''),
    )
);

$ipt_options['portfolio'] = $portfolio;

$slides = array(
    'name' => 'Slides',
    'icon' => 'slides-icon',
    'options' => array(
         array( 'name' => __('Custom Logo', 'ipt'),
               'desc' => __('Want to use a custom image as logo?', $shortname),
               'id' => 'use_logo5',     
               'type' => 'on-off',
               'std' => 0),            
        array( 'name' => __('Logo URL', 'yiw'),
               'desc' => __('Enter the URL to your logo image', $shortname),
               'id' => 'logo6',     
               'type' => 'upload',  
               'deps' => array(
                    'id' => 'use_logo5',
                    'value' => 1
               ),
               'std' => ''),
    )
);

$ipt_options['slides'] = $slides;

$seo = array(
    'name' => 'SEO',
    'icon' => 'seo-icon',
    'options' => array(
         array( 'name' => __('Custom Logo', 'ipt'),
               'desc' => __('Want to use a custom image as logo?', $shortname),
               'id' => 'use_logo6',     
               'type' => 'on-off',
               'std' => 0),            
        array( 'name' => __('Logo URL', 'yiw'),
               'desc' => __('Enter the URL to your logo image', $shortname),
               'id' => 'logo',     
               'type' => 'upload',  
               'deps' => array(
                    'id' => 'use_logo6',
                    'value' => 1
               ),
               'std' => ''),
    )
);

$ipt_options['seo'] = $seo;

?>
